import React, { PureComponent } from "react"
import { connect } from "react-redux"
// import Swiper from "@/components/main/index/section/swiper"
import { loadTheaterDataAsync } from "@/components/main/index/actionCreator"

class TheaterRecommend extends PureComponent {

    render() {
        console.log(this.props.theaterData);
        return this.props.theaterData.length!==0?(
            <div>
                {/* {
                    this.props.theaterData.map((item,index)=>{
                       <div key={index}>
                           <img src={item.pic} alt=""/>
                       </div>
                    })
                } */}
            </div>

        ):(null)
         
    }
    componentDidMount() {
        this.props.pageInit.bind(this)()
    }
}



const mapStateToProps = (state) => {
    return {
        theaterData: state.getIn(["theaterReducer", "theaterData"]).toJS()

    }
}
const mapDispatchToProps = (dispatch) => ({
    pageInit() {
        dispatch(loadTheaterDataAsync(dispatch))
    },

})
export default connect(mapStateToProps, mapDispatchToProps)(TheaterRecommend)



